
Page({
  data: {
    setArr: [],
  },

  //******************************************
  CA: function(e){ this.setData({[`bottonClr[${e.currentTarget.id}]`]: "#ddd" })},
  CB: function(e){ this.setData({[`bottonClr[${e.currentTarget.id}]`]: "#fff" })},

  onShow: function () {

  },

  onLoad: function(op){
    if (op.employee) var u = JSON.parse(op.employee);
    else var u = wx.appData.user;
    var list = [];
    for (let i = 0; i < 15; i++) list.push("white");
    this.setData({bottonClr: list})
    list = [];
    let gender = u.gender == '0' ? '未填' : u.gender == '1' ? '男' : '女'
    // TODO 执勤证、保安证、保安证等级 info 未修改
    list.push(
      { id: 1, name: "姓名", margin: "0", info: u.username },
      { id: 2, name: "性别", margin: "0", info: gender},
      { id: 3, name: "工作部门", margin: "0", info: u.gzbm || '暂无信息' },
      { id: 4, name: "保安员岗位", margin: "0", info: u.baygw || '暂无信息' },
      { id: 5, name: "现职位", margin: "0", info: u.xzw || '暂无信息' },
      { id: 6, name: "电话", margin: "0", info: u.baygw || '暂无信息' },
      { id: 7, name: "入职日期", margin: "0", info: u.rzrq || '暂无信息' },
      { id: 8, name: "执勤证编号", margin: "0", info: u.bz || '暂无信息' },
      { id: 9, name: "保安证编号", margin: "0", info: u.bz || '暂无信息' },
      { id: 10, name: "保安证等级", margin: "0", info: u.bz || '暂无信息' },
      { id: 11, name: "备注", margin: "0", info: u.bz || '暂无信息' },
    )
    this.setData({ setArr: list })
  },
  onShareAppMessage: function () {

  }



  



})